#ifndef TODOLIST_H
#define TODOLIST_H
#include <wx/arrstr.h>
#include "M_Code_plugin.h"
#include "globals.h"

class wxMenuBar;
class wxMenu;
class wxToolBar;
class FileTreeData;
class wxCommandEvent;
class wxUpdateUIEvent;
class CodeBlocksEvent;
class ToDoListView;
class FileTreeData;

class ToDoList : public M_Code_Plugin {
  public:
    ToDoList();
    ~ToDoList();
    virtual cbConfigurationPanel* GetConfigurationPanel( wxWindow* parent );
    void BuildModuleMenu( const ModuleType type, wxMenu* menu, const FileTreeData* data = 0 );
    void OnAttach();
    void OnRelease( bool appShutDown );
  private:
    void OnAppDoneStartup( CodeBlocksEvent& event );
    void OnViewList( wxCommandEvent& event );
    void OnAddItem( wxCommandEvent& event );
    void OnReparse( CodeBlocksEvent& event );
    void OnReparseCurrent( CodeBlocksEvent& event );
    void OnUpdateUI( wxUpdateUIEvent& event );
    void OnUpdateAdd( wxUpdateUIEvent& event );
    void LoadUsers();
    void SaveUsers();
    void LoadTypes();
    void SaveTypes();
    void ParseCurrent( bool forced = false );
    void Parse();
    ToDoListView* m_pListLog;
    int m_ListPageIndex;
    bool m_AutoRefresh;
    bool m_InitDone;
    bool m_ParsePending;
    wxArrayString m_Users;
    wxArrayString m_Types;
    DECLARE_EVENT_TABLE()
};

#endif
